/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tp3_1;

import javax.swing.JOptionPane;

/**
 *
 * @author aj48450
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)
    {
        try
        {
            

            Client c = new Client(args[0], Integer.parseInt(args[1]));

            String msg = "";

            do{

            msg = JOptionPane.showInputDialog(null);

            c.SendMsg(msg);

            } while ( !msg.matches("quit"));

        }
        catch ( Exception e )
        {
            System.out.println(e.getMessage());
        }
        
    }

}
